<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        nav{
            background-color: red;
        }
        .box{
            position: fixed;
            top: 50%;
            left: 50%;
            margin-top: -200px;
            margin-left: -300px;
            background-color: gold;
            width: 600px;
            height: 400px;
        }
        .box h3{
            background-color: green;
        }
        .mask{
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color:rgba(0,0,0,.3);
        }
    </style>
</head>
<body>
    <nav>导航</nav>
    <div class="box"><h3>标题</h3></div>
    <div class="mask"></div>
    <p style="margin-top: 3000px;">1</p>
</body>
</html>